package org.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.example.entity.Food;
import org.example.service.FoodService;

import java.util.List;

@RestController
@RequestMapping("/food")
public class FoodController {

    @Autowired
    private FoodService foodService;

    // 根据 businessid根据商家编号查询所属食品信息
    @GetMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(@RequestParam Integer businessId) {
        return foodService.listFoodByBusinessId(businessId);
    }
} 